﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Emergency4.Session;

namespace Emergency4.Dal
{
    /// <summary>
    /// 查询雇员的用户名
    /// 
    /// </summary>
    /// <param name="userName"></param>
    /// <returns></returns>
    /// Employees 跟数据库中的表对应
    internal class EmployeeDal
    {
        static Session2Entities en = new Session2Entities();
        internal static Employee findByEmployeeUsername(string username)
        {
            return en.Employees.Where(o => o.Username == username).FirstOrDefault();
        }
    }
}
